#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int Fac1(int n)
{
	if (n <= 2)
		return  1;
	else
		return Fac1(n - 1) + Fac1(n - 2);

}

int Fac2(int n)
{
	int a = 1;
	int b = 1;
	int c = 1;
	while (n > 2)
	{
		c = a + b;
		a = b;
		b = c;
		n--;
                
	}
	return c;

}

void reverse_string(char* string)
{
	if (*string != '\0')
		reverse_string(string + 1);
	printf("%c", *string);
   
	                                    
}

int func1(int n)
{
	if (n <= 1)
		return 1;
	else
		return n * func1(n - 1);
    

}

int func2(int n)
{
	int sum = 1;
	for (int i = 1; i <= n; i++)
	{
		sum *= i;
	}
	return sum;

}

void init(int arr[],int  len)
{
	
	for (int i = 0; i < len; i++)
	{
		arr[i] = 0;
	}


}

void print(int arr[],int len)
{

	for (int i = 0; i < len; i++)
	{
		printf("%d ", arr[i]);
	}
}

void  reverse(int arr[],int len)
{	
	for (int i = 0,j=len-1;i<j ; i++,j--)
	{
		int temp = arr[i];
		arr[i] = arr[j];
		arr[j] = temp;
              

	}

}


int main()
{


	int arr[] = { 1,2,3,4,5 };
	int  len = sizeof(arr) / sizeof(arr[0]);
	print(arr,len);
	printf("\n");
	//init(arr, len);

	//print(arr, len);

	reverse(arr, len);
	
	print(arr, len);

	
	return 0;
}